package com.coder4j.enums;

import com.coder4j.starter.web.OptionVO;

import java.util.ArrayList;
import java.util.List;

/**
 * 知识库类型枚举
 */
public enum KnowsTypeEnum {
    machinery("机械故障"),
    electricity("电气故障"),
    others("其他故障");

    /**
     * 类型描述
     */
    public String description;

    KnowsTypeEnum(String description) {
        this.description = description;
    }

    public static List<OptionVO<String>> getTypeList(){
        List<OptionVO<String>> list = new ArrayList<>();
        for (KnowsTypeEnum type : KnowsTypeEnum.values()) {
            list.add(new OptionVO<>(type.description,type.name()));
        }
        return list;
    }
}
